package org.zhaozhen.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zhaozhen.basic.service.impl.BaseServiceImpl;
import org.zhaozhen.basic.util.PageList;
import org.zhaozhen.system.domain.DictionaryDetail;
import org.zhaozhen.system.domain.DictionaryType;
import org.zhaozhen.system.mapper.DictionaryDetailMapper;
import org.zhaozhen.system.mapper.DictionaryTypeMapper;
import org.zhaozhen.system.service.IDictionaryDetailService;
import org.zhaozhen.system.service.IDictionaryTypeService;

import java.util.List;

@Service
public class DictionaryDetailServiceImpl extends BaseServiceImpl<DictionaryDetail> implements IDictionaryDetailService {

    @Autowired
    private DictionaryDetailMapper dictionarydetailmapper;
    @Override
    public PageList<DictionaryDetail> queryByTypeId(Long id){
        Long total = dictionarydetailmapper.querybyCount(id);

        List<DictionaryDetail> rows =  dictionarydetailmapper.queryByTypeId(id);
        return new PageList<>(total,rows);
    }
}
